Apparatus and method of encoding and decoding audio signal

ABSTRACT

In one embodiment, at least first and second channels in a frame of the audio signal are independently subdivided into blocks if the first and second channels are not correlated with each other. The first and second channels are corresponding subdivided into blocks such that the lengths of the blocks into which the second channel is subdivided correspond to the lengths of the blocks into which the first channel is subdivided if the first and second channels are correlated with each other. First information may be generated to indicate whether the first and second channels are independently subdivided or correspondingly subdivided.

DOMESTIC PRIORITY INFORMATION

This application claims the benefit of priority on U.S. ProvisionalApplication Nos. 60/697,551 and 60/700,570 filed Jul. 11, 2005 and Jul.19, 2005, respectively; the entire contents of both of which are herebyincorporated by reference.

FOREIGN PRIORITY INFORMATION

This application claims the benefit of priority on International PCTApplication Nos. PCT/KR2005/002290, PCT/KR2005/002291,PCT/KR2005/002292, PCT/KR2005/002306, PCT/KR2005/002307 andPCT/KR2005/002308 filed Jul. 16, 2005, Jul. 16, 2005, Jul. 16, 2005,Jul. 18, 2005, Jul. 18, 2005 and Jul. 18, 2005, respectively; the entirecontents of which are hereby incorporated by reference.

BACKGROUND OF THE INVENTION

The present invention relates to a method for processing audio signal,and more particularly to a method and apparatus of encoding and decodingaudio signal.

The storage and replaying of audio signals has been accomplished indifferent ways in the past. For example, music and speech have beenrecorded and preserved by phonographic technology (e.g., recordplayers), magnetic technology (e.g., cassette tapes), and digitaltechnology (e.g., compact discs). As audio storage technologyprogresses, many challenges need to be overcome to optimize the qualityand storability of audio signals.

For the archiving and broadband transmission of music signals, losslessreconstruction is becoming a more important feature than high efficiencyin compression by means of perceptual coding as defined in MPEGstandards such as MP3 or AAC. Although DVD audio and Super CD Audioinclude proprietary lossless compression schemes, there is a demand foran open and general compression scheme among content-holders andbroadcasters. In response to this demand, a new lossless coding schemehas been considered as an extension to the MPEG-4 Audio standard.Lossless audio coding permits the compression of digital audio datawithout any loss in quality due to a perfect reconstruction of theoriginal signal.

SUMMARY OF THE INVENTION

The present invention relates to method of processing an audio signal.

In one embodiment, at least first and second channels in a frame of theaudio signal are independently subdivided into blocks if the first andsecond channels are not correlated with each other. The first and secondchannels are corresponding subdivided into blocks such that the lengthsof the blocks into which the second channel is subdivided correspond tothe lengths of the blocks into which the first channel is subdivided ifthe first and second channels are correlated with each other. Firstinformation may be generated to indicate whether the first and secondchannels are independently subdivided or correspondingly subdivided.

In one embodiment, the first information may include a number ofinformation bits, and a first of the information bits indicates whetherthe first and second channels are independently subdivided orcorrespondingly subdivided.

In one embodiment, the independently subdividing step and thecorrespondingly subdividing step both subdivide the first and secondchannels according to a subdivision hierarchy. The subdivision hierarchyhas more than one level, and each level is associated with a differentblock length.

In one embodiment, the first information is generated such that a lengthof the first information depends on a number of levels in thesubdivision hierarchy. For example, the first information may begenerated such that the information includes a number of informationbits, and the information bits indicate the subdivision of the channelinto the blocks. More specifically, each information bit may beassociated with a level in the subdivision hierarchy and may beassociated with a block at the associated level, and each informationbit indicates whether the associated block was subdivided.

In one embodiment, the method further includes predicting current datasamples in the channel based on previous data samples. The number of theprevious data samples used in the predicting is referred to as theprediction order. A residual of the current data samples is obtainedbased on the predicted data samples.

In one embodiment, the prediction is performed by progressivelyincreasing the prediction order to a desired prediction order asprevious data samples become available. For example, this progressiveprediction process may be performed for random access frames, which areframes to be encoded such that previous frames are not necessary todecode the frame.

In another embodiment, the desired prediction order for each block isdetermined based on a maximum permitted prediction order and a length ofthe block.

The present invention further relates to methods and apparatuses forencoding an audio signal, and to methods and apparatuses for decoding anaudio signal.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are included to provide a furtherunderstanding of the invention and are incorporated in and constitute apart of this application, illustrate embodiment(s) of the invention andtogether with the description serve to explain the principle of theinvention. In the drawings:

FIG. 1 is an example illustration of an encoder according to anembodiment of the present invention.

FIG. 2 is an example illustration of a decoder according to anembodiment of the present invention.

FIG. 3 is an example illustration of a bitstream structure of acompressed M-channel file according to an embodiment of the presentinvention.

FIG. 4 is an example illustration of a conceptual view of a hierarchicalblock switching method according to an embodiment of the presentinvention.

FIG. 5 is an example illustration of a block switching examples andcorresponding block switching information codes.

FIG. 6 is an example illustration of block switching methods for aplurality of channel according to embodiments of the present invention.

DETAILED DESCRIPTION OF EXAMPLE EMBODIMENTS

Reference will now be made in detail to the preferred embodiments of thepresent invention, examples of which are illustrated in the accompanyingdrawings. Wherever possible, the same reference numbers will be usedthroughout the drawings to refer to the same or like parts.

Prior to describing the present invention, it should be noted that mostterms disclosed in the present invention correspond to general termswell known in the art, but some terms have been selected by theapplicant as necessary and will hereinafter be disclosed in thefollowing description of the present invention. Therefore, it ispreferable that the terms defined by the applicant be understood on thebasis of their meanings in the present invention.

In a lossless audio coding method, since the encoding process has to beperfectly reversible without loss of information, several parts of bothencoder and decoder have to be implemented in a deterministic way.

Codec Structure

FIG. 1 is an example illustration of an encoder 1 according to thepresent invention.

A partitioning part 100 partitions the input audio data into frames.Within one frame, each channel may be further subdivided into blocks ofaudio samples for further processing. A buffer 110 stores block and/orframe samples partitioned by the partitioning part 100.

A coefficient estimating part 120 estimates an optimum set ofcoefficient values for each block. The number of coefficients, i.e., theorder of the predictor, can be adaptively chosen as well. Thecoefficient estimating part 120 calculates a set of parcor values forthe block of digital audio data. The parcor value indicates parcorrepresentation of the predictor coefficient. A quantizing part 130quantizes the set of parcor values.

A first entropy coding part 140 calculates parcor residual values bysubtracting an offset value from the parcor value, and encodes theparcor residual values using entropy codes defined by entropyparameters, wherein the offset value and the entropy parameters arechosen from an optimal table. The optimal table is selected from aplurality of tables based on a sampling rate of the block of digitalaudio data. The plurality of tables are predefined for a plurality ofsampling rate ranges, respectively, for optimal compression of thedigital audio data for transmission.

A coefficient converting part 150 converts the quantized parcor valuesinto linear predictive coding (LPC) coefficients. A predictor 160estimates current prediction values from the previous original samplesstored in the buffer 110 using the linear predictive codingcoefficients. A subtracter 170 calculates a prediction residual of theblock of digital audio data using an original value of digital audiodata stored in the buffer 110 and a prediction value estimated in thepredictor 160.

A second entropy coding part 180 codes the prediction residual usingdifferent entropy codes and generates code indices. The indices of thechosen codes will be transmitted as auxiliary information. The secondentropy coding part 180 may code the prediction residual using one oftwo alternative coding techniques having different complexities. Onecoding technique is the well-known Golomb-Rice coding (herein aftersimply “Rice code”) method and the other is the well-known BlockGilbert-Moore Codes (herein after simply “BGMC”) method. Rice codes havelow complexity yet are efficient. The BGMC arithmetic coding schemeoffers even better compression at the expense of a slightly increasedcomplexity compared to Rice codes.

Finally, a multiplexing part 190 multiplexes coded prediction residual,code indices, coded parcor residual values, and other additionalinformation to form a compressed bitstream. The encoder 1 also providesa cyclic redundancy check (CRC) checksum, which is supplied mainly forthe decoder to verify the decoded data. On the encoder side, the CRC canbe used to ensure that the compressed data are losslessly decodable.

Additional encoding options include flexible block switching scheme,random access and joint channel coding. The encoder 1 may use theseoptions to offer several compression levels with different complexities.The joint channel coding is used to exploit dependencies betweenchannels of stereo or multi-channel signals. This can be achieved bycoding the difference between two channels in the segments where thisdifference can be coded more efficiently than one of the originalchannels. These encoding options will be described in more detail belowafter a description of an example decoder according to the presentinvention.

FIG. 2 is an example illustration of a decoder 2 according to thepresent invention. More specially, FIG. 2 shows the lossless audiosignal decoder which is significantly less complex than the encoder,since no adaptation has to be carried out.

A demultiplexing part 200 receives an audio signal and demultiplexes acoded prediction residual of a block of digital audio data, codeindices, coded parcor residual values and other additional information.A first entropy decoding part 210 decodes the parcor residual valuesusing entropy codes defined by entropy parameters and calculates a setof parcor values by adding offset values to the decoded parcor residualvalues; wherein the offset value and the entropy parameters are chosenfrom a table selected by the decoder from a plurality of tables based ona sampling rate of the block of digital audio data. A second entropydecoding part 220 decodes the demultiplexed coded prediction residualusing the code indices. A coefficient converting part 230 converts theentropy decoded parcor value into LPC coefficients. A predictor 240estimates a prediction residual of the block of digital audio data usingthe LPC coefficients. An adder 250 adds the decoded prediction residualto the estimated prediction residual to obtain the original block ofdigital audio data. An assembling part 260 assembles the decoded blockdata into frame data.

Therefore, the decoder 2 decodes the coded prediction residual and theparcor residual values, converts the parcor residual values into LPCcoefficients, and applies the inverse prediction filter to calculate thelossless reconstruction signal. The computational effort of the decoder2 depends on the prediction orders chosen by the encoder 1. In mostcases, real-time decoding is possible even on low-end systems.

FIG. 3 is an example illustration of a bitstream structure of acompressed audio signal including a plurality of channels (e.g., Mchannels) according to the present invention.

The bitstream consists of at least one audio frame including a pluralityof channels (e.g., M channels). The “channels” field in the bitstreamconfiguration syntax (see Table 6 below) indicates the number ofchannels. Each channel is sub-divided into a plurality of blocks usingthe block switching scheme according to present invention, which will bedescribed in detail later. Each sub-divided block has a different sizeand includes coding data according to the encoding of FIG. 1. Forexample, the coding data within a subdivided block contains the codeindices, the prediction order K, the predictor coefficients, and thecoded residual values. If joint coding between channel pairs is used,the block partition is identical for both channels, and blocks arestored in an interleaved fashion. A “js_stereo” field in the bitstreamconfiguration syntax (Table 6) indicates whether joint stereo (channeldifference) is on or off, and a “js_switch” field in the frame_datasyntax (See Table 7 below) indicates whether joint stereo (channeldifference) is selected. Otherwise, the block partition for each channelis independent.

Hereinafter, the block switching, random access, prediction, and entropycoding options previously mentioned will now be described in detail withreference to the accompanying drawings and syntaxes that follow.

Block Switching

An aspect of the present invention relates to subdividing each channelinto a plurality of blocks prior to using the actual coding scheme.Hereinafter, the block partitioning (or subdividing) method according tothe present invention will be referred to as a “block switching method”.

Hierarchical Block Switching

FIG. 4 is an example illustration of a conceptual view of a hierarchicalblock switching method according to the present invention. For example,FIG. 4 illustrates a method of hierarchically subdividing one channelinto 32 blocks. When a plurality of channels is provided in a singleframe, each channel may be subdivided (or partitioned) to up to 32blocks, and the subdivided blocks for each channel configure a frame.

Accordingly, the block switching method according to the presentinvention is performed by the partitioning part 100 shown in FIG. 1.Furthermore, as described above, the prediction and entropy coding areperformed on the subdivided block units.

In general, conventional Audio Lossless Coding (ALS) includes arelatively simple block switching mechanism. Each channel of N samplesis either encoded using one full length block (N_(B)=N) or four blocksof length N_(B)=N/4 (e.g., 1:4 switching), where the same blockpartition applies to all channels. Under some circumstances, this schememay have some limitations. For example, while only 1:1 or 1:4 switchingmay be possible, different switching (e.g., 1:2, 1:8, and combinationsthereof) may be more efficient in some cases. Also in conventional ALS,switching is performed identically for all channels, although differentchannels may benefit from different switching (which is especially trueif the channels are not correlated).

Therefore, the block switching method according to embodiments of thepresent invention provide relatively flexible block switching schemes,where each channel of a frame may be hierarchically subdivided into aplurality of blocks. For example, FIG. 4 illustrates a channel which canbe hierarchically subdivided to up to 32 blocks. Arbitrary combinationsof blocks with N_(B)=N, N/2, N/4, N/8, N/16, and N/32 may be possiblewithin a channel according to the presented embodiments, as long as eachblock results from a subdivision of a superordinate block of doublelength. For example, as illustrated in the example shown in FIG. 4, apartition into N/4+N/4+N/2 may be possible, while a partition intoN/4+N/2+N/4 may not be possible (e.g., block switching examples shown inFIGS. 5(e) and 5 described below). Stated another way, the channel isdivided into the plurality of blocks such that each block has a lengthequal to one of,N/(m^(i)) for i=1, 2, . . . p,where N is the length of the channel, m is an integer greater than orequal to 2, and p represents a number of the levels in the subdivisionhierarchy.

Accordingly, in embodiments of the present invention, a bitstreamincludes information indicating block switching levels and informationindicating block switching results. Herein, the information related toblock switching is included in the syntax, which is used in the decodingprocess, described in detail below.

For example, settings are made so that a minimum block size generatedafter the block switching process is N_(B)=N/32. However, this settingis only an example for simplifying the description of the presentinvention. Therefore, settings according to the present invention arenot limited to this setting.

More specifically, when the minimum block size is N_(B)=N/32, thisindicates that the block switching process has been hierarchicallyperformed 5 times, which is referred to as a level 5 block switching.Alternatively, when the minimum block size is N_(B)=N/16, this indicatesthat the block switching process has been hierarchically performed 4times, which is referred to as a level 4 block switching. Similarly,when the minimum block size is N_(B)=N/8, the block switching processhas been hierarchically performed 3 times, which is referred to as alevel 3 block switching. And, when the minimum block size is N_(B)=N/4,the block switching process has been hierarchically performed 2 times,which is referred to as a level 2 block switching. When the minimumblock size is N_(B)=N/2, the block switching process has beenhierarchically performed 1 time, which is referred to as a level 1 blockswitching. Finally, when the minimum block size is N_(B)=N, thehierarchical block switching process has not been performed, which isreferred to as a level 0 block switching.

In embodiments of the present invention, the information indicating theblock switching level will be referred to as a first block switchinginformation. For example, the first block switching information may berepresented by a 2-bit “block_switching” field within the syntax shownin Table 6, which will be described in a later process. Morespecifically, “block_switching=00” signifies level 0,“block_switching=01” signifies any one of level 1 to level 3,“block_switching=10” signifies level 4, and “block_switching=11”signifies level 5.

Additionally, information indicating the results of the block switchingperformed for each hierarchical level in accordance with theabove-described block switching levels is referred to in the embodimentsas second block switching information. Herein, the second blockswitching information may be represented by a “bs_info” field which isexpressed by any one of 8 bits, 16 bits, and 32 bits within the syntaxshown in Table 7. More specifically, if “block_switching=01” (signifyingany one of level 1 to level 3), “bs_info” is expressed as 8 bits. If“block_switching=10” (signifying level 4), “bs_info” is expressed as 16bits. In other words, up to 4 levels of block switching results may beindicated by using 16 bits. Furthermore, if “block_switching=11”(signifying level 5, “bs_info” is expressed as 32 bits. In other words,up to 5 levels of block switching results may be indicated by using 32bits. Finally, if “block_switching=00” (signifying that the blockswitching has not been performed), “bs_info” is not transmitted. Thissignifies that one channel configures one block.

The total number of bits being allocated for the second block switchinginformation is decided based upon the level value of the first blockswitching information. This may result in reducing the final bit rate.The relation between the first block switching information and thesecond block switching information is briefly described in Table 1below. TABLE 1 Block switching levels. Maximum #levels Minimum N_(B)#Bytes for “bs_info” 0 N 0 (“block_switching = 00”) 1 N/2 1 (=8bits)(“block_switching = 01”) 2 N/4 1 (=8bits) (“block_switching = 01”) 3 N/81 (=8bits) (“block_switching = 01”) 4 N/16 2 (=16bits) (“block_switching= 10”) 5 N/32 4 (=32bits) (“block_switching = 11”)

Hereinafter, an embodiment of a method of configuring (or mapping) eachbit within the second block switching information (bs_info) will now bedescribed in detail.

The bs_info field may include up to 4 bytes in accordance with theabove-described embodiments. The mapping of bits with respect to levels1 to 5 may be [(0)1223333 44444444 55555555 55555555]. The first bit maybe reserved for indicating independent or synchronous block switching,which is described in more detail below in the Independent/SynchronousBlock Switching section. FIGS. 5(a)-5(f) illustrate different blockswitching examples for a channel where level 3 block switching may takeplace. Therefore, in these examples, the minimum block length is NB=N/8,and the bs_info consists of one byte. Starting from the maximum blocklength N_(B)=N, the bits of bs_info are set if a block is furthersubdivided. For example, in FIG. 5(a), there is no subdivision at all,thus “bs_info” is (0)000 0000. In FIG. 5(b), the frame is subdivided((0)1 . . . ) and the second block of length N/2 is further split((0)101 . . . ) into two blocks of length N/4; thus “bs_info” is (0)10100000. In FIG. 5(c), the frame is subdivided ((0)1 . . . ), and only thefirst block of length N/2 is further split ((0)110 . . . ) into twoblocks of length N/4; thus “bs_info” is (0)1100 0000. In FIG. 5(d), theframe is subdivided ((0)1 . . . ), the first and second blocks of lengthN/2 is further split ((0)111 . . . ) into two blocks of length N/4, andonly the second block of length N/4 is further split ((0)11101 . . . )into two blocks of length N/8; thus “bs_info” is (0)111 0100.

As discussed above, the examples in FIGS. 5(e) and 5(f) represent casesof block switching that are not permitted because the N/2 block in FIG.5(e) and the first N/4 block in FIG. 5(f) could not have been obtainedby subdividing a block of the previous level.

Independent/Synchronous Block Switching

FIGS. 6(a)-6(c) are example illustrations of block switching accordingto embodiments of the present invention.

More specifically, FIG. 6(a) illustrates an example where blockswitching has not been performed for channels 1, 2, and 3. FIG. 6(b)illustrates an example in which two channels (channels 1 and 2)configure one channel pair, and block switching is performedsynchronously in channels 1 and 2. Interleaving is also applied in thisexample. FIG. 6(c) illustrates an example in which two channels(channels 1 and 2) configure one channel pair, and the block switchingof channels 1 and 2 is performed independently. Herein, the channel pairrefers to two arbitrary audio channels. The decision on which channelsare grouped into channel pairs can be made automatically by the encoderor manually by the user. (e.g., L and R channels, Ls and Rs channels).

In independent block switching, while the length of each channel may beidentical for all channels, the block switching can be performedindividually for each channel. Namely, as shown in FIG. 6(c), thechannels may be divided into blocks differently. If the two channels ofa channel pair are correlated with each other and difference coding isused, both channels of a channel pair may be block switchedsynchronously. In synchronous block switching, the channels are blockswitched (i.e., divided into blocks) in the same manner. FIG. 6(b)illustrates an example of this, and further illustrates that the blocksmay be interleaved. If the two channels of a channel pair are notcorrelated with each other, difference coding may not provide a benefit,and thus there will be no need to block switch the channelssynchronously. Instead, it may be more appropriate to switch thechannels independently.

Furthermore, according to another embodiment of the present invention,the described method of independent or synchronous block switching maybe applied to a multi-channel group having a number of channels equal toor more than 3 channels. For example, if all channels of a multi-channelgroup are correlated with each other, all channels of a multi-channelgroup may be switched synchronously. On the other hand, if all channelsof a multi-channel group are not correlated with each other, eachchannel of the multi-channel group may be switched independently.

Moreover, the “bs_info” field is used as the information for indicatingthe block switching result. Additionally, the “bs_info” field is alsoused as the information for indicating whether block switching has beenperformed independently or performed synchronously for each channelconfiguring the channel pair. In this case, as described above, aparticular bit (e.g., first bit) within the “bs_info” field may be used.If, for example, the two channels of the channel pair are independentfrom one another, the first bit of the “bs_info” field is set to “1”. Onthe other hand, if the two channels of the channel pair are synchronousto one another, the first bit of the “bs_info” field is set as “0”.

Hereinafter, FIGS. 6(a), 6(b), and 6(c) will now be described in detail.

Referring to FIG. 6(a), since none of the channels perform blockswitching, the related “bs_info” is not generated.

Referring to FIG. 6(b), channels 1 and 2 configure a channel pair,wherein the two channels are synchronous to one another, and whereinblock switching is performed synchronously. For example, in FIG. 6(b),both channels 1 and 2 are split into blocks of length N/4, both havingthe same bs_info “bs_info=(0) 101 0000”. Therefore, one “bs_info” may betransmitted for each channel pair, which results in reducing the bitrate. Furthermore, if the channel pair is synchronous, each block withinthe channel pair may be required to be interleaved with one another. Theinterleaving may be beneficial (or advantageous). For example, a blockof one channel (e.g., block 1.2 in FIG. 6(b)) within a channel pair maydepend on previous blocks from both channels (e.g., blocks 1.1 and 2.1in FIG. 6(b)), and so these previous blocks should be available prior tothe current one.

Referring to FIG. 6(c), channels 1 and 2 configure a channel pair.However, in this example, block switching is performed independently.More specifically, channel 1 is split into blocks of a size (or length)of up to N/4 and has a bs_info of “bs_info=(1)101 0000”. Channel 2 issplit into blocks of a size of up to N/2 and has a bs_info of“bs_info=(1)100 0000”. In the example shown in FIG. 6(c), blockswitching is performed independently among each channel, and therefore,the interleaving process between the blocks is not performed. In otherwords, for the channel having the blocks switched independently, channeldata may be arranged separately.

Joint Channel Coding

Joint channel coding, also called joint stereo, can be used to exploitdependencies between two channels of a stereo signal, or between any twochannels of a multi-channel signal. While it is straightforward toprocess two channels x₁(n) and X₂ (n) independently, a simple method ofexploiting dependencies between the channels is to encode the differencesignal:d(n)=x ₂(n)−x ₁(n)

instead of x1(n) or x2(n). Switching between x₁(n), x₂(n) and d(n) ineach block may be carried out by comparison of the individual signals,depending on which two signals can be coded most efficiently. Suchprediction with switched difference coding is advantageous in caseswhere two channels are very similar to one another. In case ofmulti-channel material, the channels can be rearranged by the encoder inorder to assign suitable channel pairs.

Besides simple difference coding, lossless audio codec also supports amore complex scheme for exploiting inter-channel redundancy betweenarbitrary channels of multi-channel signals.

Random Access

The present invention relates to audio lossless coding and is able tosupports random access. Random access stands for fast access to any partof the encoded audio signal without costly decoding of previous parts.It is an important feature for applications that employ seeking,editing, or streaming of the compressed data. In order to enable randomaccess, within a random access unit, the encoder needs to insert a framethat can be decoded without decoding previous frames. The inserted frameis referred to as a “random access frame”. In such a random accessframe, no samples from previous frames may be used for prediction.

Hereinafter, the information for random access according to the presentinvention will be described in detail. Referring to the configurationsyntax (shown in Table 6), information related with random access aretransmitted as configuration information. For example, a “random_access”field is used as information for indicating whether random access isallowed, which may be represented by using 8 bits. Furthermore, ifrandom access is allowed, the 8-bit “random_access” field designates thenumber of frames configuring a random access unit. For example, when“random_access=0000 0000”, the random access is not supported. In otherwords, when “random_access>0”, random access is supported. Morespecifically, when “random_access=0000 0001”, this indicates that thenumber of frames configuring the random access unit is 1. This signifiesthat random access is allowed in all frame units. Furthermore, when“random_access=1111 1111”, this indicates that the number of framesconfiguring the random access unit is 255. Accordingly, the“random_access” information corresponds to a distance between a randomaccess frame within the current random access unit and a random accessframe within the next random access unit. Herein, the distance isexpressed by the number of frames.

A 32-bit “ra_unit_size” field is included in the bitstream andtransmitted. Herein, the “ra_unit_size” field indicates the size fromthe current random access frame to the next random access frame in byteunits. Accordingly, the “ra_unit_size” field is either included in theconfiguration syntax (Table 6) or included in the frame-data syntax(Table 7). The configuration syntax (Table 6) may further includeinformation indicating a location where the “ra_unit_size” informationis stored within the bitstream. This information is represented as a2-bit “ra_flag” field. More specifically, for example, when“ra_flag=00”, this indicates that the “ra_unit_size” information is notstored in the bitstream. When the “ra_flag=01”, this indicated that the“ra_unit_size” information is stored in the frame-data syntax (Table 7)within the bitstream. Furthermore, when the “ra_flag=10”, the“ra_unit_size” information is stored in the configuration syntax (Table6) within the bitstream. If the “ra_unit_size” information is includedin the configuration syntax, this indicates that the “ra_unit_size”information is transmitted on the bitstream only one time and is appliedequally to all random access units. Alternatively, if the “ra_unit_size”information is included in the frame-data syntax, this indicates thedistance between the random access frame within the current randomaccess unit and the random access frame within the next random accessunit. Therefore, the “ra_unit_size” information is transmitted for eachrandom access unit within the bitstream.

Accordingly, the “random_access” field within the configuration syntax(Table 6) may also be referred to as first general information. And, the“ra_flag” field may also be referred to as second general information.In this aspect of the present invention, an audio signal includesconfiguration information and a plurality of random access units, eachrandom access unit containing one or more audio data frames, one ofwhich is a random access frame, wherein the configuration informationincludes first general information indicating a distance between twoadjacent random access frames in frames, and second general informationindicating where random access unit size information for each randomaccess unit is stored. The random access unit size informationindicating a distance between two adjacent random access frames inbytes.

Alternatively, in this aspect of the present invention, a method ofdecoding an audio signal includes receiving the audio signal havingconfiguration information and a plurality of random access units, eachrandom access unit containing one or more audio data frames, one ofwhich is a random access frame, reading first general information fromthe configuration information, the first general information indicatinga distance between two adjacent random access frames in frames, andreading second general information from the configuration information,the second general information indicating where random access sizeinformation for each random access unit is stored, and the random accessunit size information indicating a distance between two adjacent randomaccess frames in bytes.

Channel Configuration

As shown in FIG. 3, an audio signal includes multi-channels informationaccording to the present invention. For example, each channel may bemapped at a one-to-one correspondence with a location of an audiospeaker. The configuration syntax (Table 6 below) includes channelconfiguration information, which is indicated as a 16-bit“chan_config_info” field and a 16-bit “channels” field. The“chan_config_info” field includes information for mapping the channelsto the loudspeaker locations and the 16-bit “channels” field includesinformation indicating the total number of channels. For example, whenthe “channels” field is equal to “0”, this indicates that the channelcorresponds to a mono channel. When the “channels” field is equal to“1”, this indicates that the channel corresponds to one of stereochannels. And, when the “channels” field is equal to or more than “2”,this indicates that the channel corresponds to one of multi-channels.

Table 2 below shows examples of each bit configuring the“chan_config_info” field and each respective channel correspondingthereto. More specifically, when a corresponding channel exists withinthe transmitted bitstream, the corresponding bit within the“chan_config_info” field is set to “1”. Alternatively, when acorresponding channel does not exist within the transmitted bitstream,the corresponding bit within the “chan_config_info” field is set to “0”.The present invention also includes information indicating whether the“chan_config_info” field exists within the configuration syntax (Table6). This information is represented as a 1-bit “chan_config” flag. Morespecifically, “chan_config=0” indicates that the “chan_config_info”field does not exist. And, “chan_config=1” indicates that the“chan_config_info” field exists. Therefore, when “chan_config=0”, thisindicates that the “chan_config_info” field is not newly defined withinthe configuration syntax (Table 6). TABLE 2 Channel configuration. Bitposition in Speaker location Abbreviation chan_config_info Left L 1Right R 2 Left Rear Lr 3 Right Rear Rr 4 Left Side Ls 5 Right Side Rs 6Center C 7 Center Rear/ S 8 Surround Low Frequency LFE 9 Effects LeftDownmix L0 10 Right Downmix R0 11 Mono Downmix M 12 (reserved) 13-16

Frame Length

As shown in FIG. 3, an audio signal includes multiple or multi-channelsaccording to the present invention. Therefore, when performing encoding,information on the number of multi-channels configuring one frame andinformation on the number of samples for each channel are inserted inthe bitstream and transmitted. Referring to the configuration syntax(Table 6), a 32-bit “samples” field is used as information indicatingthe total number of audio data samples configuring each channel.Further, a 16-bit “frame_length” field is used as information indicatingthe number of samples for each channel within the corresponding frame.

Furthermore, a 16-bit value of the “frame_length” field is determined bya value used by the encoder, and is referred to as a user-defined value.In other words, instead of being a fixed value, the user-defined valueis arbitrarily determined upon the encoding process.

Therefore, during the decoding process, when the bitstream is receivedthrough the demultiplexing part 200 of shown in FIG. 2, the frame numberof each channel should first be obtained. This value is obtainedaccording to the algorithm shown below. frames = samples / frame_length; rest = samples % frame_length;  if (rest)  {   frames++;   frlen_last =rest;  }  else   frlen_last = frame_length;

More specifically, the total number of frames for each channel iscalculated by dividing the total number of samples for each channel,which is decided by the “samples” field transmitted through thebitstream, by the number of samples within a frame of each channel,which is decided by the “frame_length” field. For example, when thetotal number of samples decided by the “samples” field is an exactmultiple of the number of samples within each frame, which is decided bythe “frame_length” field, the multiple value becomes the total number offrames. However, if the total number of samples decided by the “samples”field is not an exact multiple of the number of samples decided by the“frame_length” field, and a remainder (or rest) exist, the total numberof frames increases by “1” more than the multiple value. Furthermore,the number of samples of the last frame (frlen_last) is decided as theremainder (or rest). This indicates that only the number of samples ofthe last frame is different from its previous frame.

By defining a standardized rule between the encoder and the decoder, asdescribed above, the encoder may freely decide and transmit the totalnumber of samples (“samples” field) for each channel and the number ofsamples (“frame_length” field) within a frame of each channel.Furthermore, the decoder may accurately decide, by using theabove-described algorithm on the transmitted information, the number offrames for each channel that is to be used for decoding.

Linear Prediction

In the present invention, linear prediction is applied for the losslessaudio coding. The predictor 160 shown in FIG. 1 includes at least one ormore filter coefficients so as to predict a current sample value from aprevious sample value. Then, the second entropy coding part 180 performsentropy coding on a residual value corresponding to the differencebetween the predicted value and the original value. Additionally, thepredictor coefficient values for each block that are applied to thepredictor 160 are selected as optimum values from the coefficientestimating part 120. Further, the predictor coefficient values areentropy coded by the first entropy coding part 140. The data coded bythe first entropy coding part and the second entropy coding part 180 areinserted as part of the bitstream by the multiplexing part 190 and thentransmitted.

Hereinafter, the method of performing linear prediction according to thepresent invention will now be described in detail.

Prediction with FIR Filters

Linear prediction is used in many applications for speech and audiosignal processing. Hereinafter, an exemplary operation of the predictor160 will be described based on Finite Impulse Response (FIR) filters.However, it is apparent that this example will not limit the scope ofthe present invention.

The current sample of a time-discrete signal x(n) can be approximatelypredicted from previous samples x(n−k). The prediction is given by thefollowing equation.${{\hat{x}(n)} = {\sum\limits_{k = 1}^{K}{h_{k}*{x\left( {n - k} \right)}}}},$

wherein K is the order of the predictor. If the predicted samples areclose to the original samples, the residual shown below:e(n)=x(n)−{circumflex over (x)}(n)

has a smaller variance than x(n) itself, hence e(n) can be encoded moreefficiently.

The procedure of estimating the predictor coefficients from a segment ofinput samples, prior to filtering that segment is referred to as forwardadaptation. In this case, the coefficients should be transmitted. On theother hand, if the coefficients are estimated from previously processedsegments or samples, e.g., from the residual, reference is made tobackward adaptation. The backward adaptation procedure has the advantagethat no transmission of the coefficients is needed, since the datarequired to estimate the coefficients is available to the decoder aswell.

Forward-adaptive prediction methods with orders around 10 are widelyused in speech coding, and can be employed for lossless audio coding aswell. The maximum order of most forward-adaptive lossless predictionschemes is still rather small, e.g., K=32. An exception is the special1-bit lossless codec for the Super Audio CD, which uses predictionorders of up to 128.

On the other hand, backward-adaptive FIR filters with some hundredcoefficients are commonly used in many areas, e.g., channel equalizationand echo cancellation. Most of these systems are based on the LMSalgorithm or a variation thereof, which has also been proposed forlossless audio coding. Such LMS-based coding schemes with high ordersare applicable since the predictor coefficients do not have to betransmitted as side information, thus their number does not contributeto the data rate. However, backward-adaptive codecs have the drawbackthat the adaptation has to be carried out both in the encoder and thedecoder, making the decoder significantly more complex than in theforward-adaptive case.

Forward-Adaptive Prediction

As an exemplary embodiment of the present invention, forward adaptiveprediction will be given as an example in the description set forthherein. In forward-adaptive linear prediction, the optimal predictorcoefficients h_(k) (in terms of a minimized variance of the residual)are usually estimated for each block by the coefficient estimating part120 using the autocorrelation method or the covariance method. Theautocorrelation method, using the conventional Levinson-Durbinalgorithm, has the additional advantage of providing a simple means toiteratively adapt the order of the predictor. Furthermore, the algorithminherently calculates the corresponding parcor coefficients as well.

Another aspect of forward-adaptive prediction is to determine a suitableprediction order. Increasing the order decreases the variance of theprediction error, which leads to a smaller bit rate R_(e) for theresidual. On the other hand, the bit rate R_(c) for the predictorcoefficients will rise with the number of coefficients to betransmitted. Thus, the task is to find the optimum order which minimizesthe total bit rate. This can be expressed by minimizing the equationbelow:R _(total)(K)=R _(e)(K)+R _(c)(K),with respect to the prediction order K. As the prediction gain risesmonotonically with higher orders, Re decreases with K. On the other handR_(c) rises monotonically with K, since an increasing number ofcoefficients should be transmitted.

The search for the optimum order can be carried out efficiently by thecoefficient estimating part 120, which determines recursively allpredictors with increasing order. For each order, a complete set ofpredictor coefficients is calculated. Moreover, the variance σ_(e) ² ofthe corresponding residual can be derived, resulting in an estimate ofthe expected bit rate for the residual. Together with the bit rate forthe coefficients, the total bit rate can be determined in eachiteration, i.e., for each prediction order. The optimum order is foundat the point where the total bit rate no longer decreases.

While it is obvious from the above equation that the coefficient bitrate has a direct effect on the total bit rate, a slower increase ofR_(c) also allows to shift the minimum of R_(total) to higher orders(wherein R_(e) is smaller as well), which would lead to bettercompression. Hence, efficient yet accurate quantization of the predictorcoefficients plays an important role in achieving maximum compression.

Prediction Orders

In the present invention, the prediction order K, which decides thenumber of predictor coefficients for linear prediction, is determined.The prediction order K is also determined by the coefficient estimatingpart 120. Herein, information on the determined prediction order isincluded in the bitstream and then transmitted.

The configuration syntax (Table 6) includes information related to theprediction order K. For example, a 1-bit to 10-bit “max_order” fieldcorresponds to information indicating a maximum order value. The highestvalue of the 1-bit to 10-bit “max_order” field is K=1023 (e.g., 10-bit).As another information related to the prediction order K, theconfiguration syntax (Table 6) includes a 1-bit “adapt_order” field,which indicates whether an optimum order for each block exists. Forexample, when “adapt_order=1”, an optimum order should be provided foreach block. In a block_data syntax (Table 8), the optimum order isprovided as a 1-bit to 10-bit “opt_order” field. Further, when“adapt_order=0”, a separate optimum order is not provided for eachblock. In this case, the “max_order” field becomes the final orderapplied to all of the blocks.

The optimum order (opt_order) is decided based upon the value ofmax_order field and the size (N_(B)) of the corresponding block. Morespecifically, for example, when the max_order is decided as K_(max)=10and “adapt_order=1”, the opt_order for each block may be decidedconsidering the size of the corresponding block. In some case, theopt_order value being larger than max_order (K_(max)=10) is possible.

In particular, the present invention relates to higher predictionorders. In the absence of hierarchical block switching, there may be afactor of 4 between the long and the short block length (e.g. 4096 &1024 or 8192 & 2048), in accordance with the embodiments. On the otherhand, in the embodiments where hierarchical block switching isimplemented, this factor can be increased (e.g., up to 32), enabling alarger range (e.g., 16384 down to 512 or even 32768 to 1024 for highsampling rates).

In the embodiments where hierarchical block switching is implemented, inorder to make better use of very long blocks, higher maximum predictionorders may be employed. The maximum order may be K_(max)=1023. In theembodiments, K_(max) may be bound by the block length N_(B), forexample, K_(max)<N_(B)/8 (e.g., K=255 for N_(B)=2048). Therefore, usingK_(max)=1023 may require a block length of at least N_(B)=8192. In theembodiments, the “max_order” field in the configuration syntax (Table 6)can be up to 10 bits and “opt_order” field in the block_data syntax(Table 8) can also be up to 10 bits. The actual number of bits in aparticular block may depend on the maximum order allowed for a block. Ifthe block is short, a local prediction order may be smaller than aglobal prediction order. Herein, the local prediction order isdetermined from considering the corresponding block length N_(B), andthe global prediction order is determined from the “max_order” K_(max)in the configuration syntax. For example, if K_(max)=1023, butN_(B)=2048, the “opt_order” field is determined on 8 bits (instead of10) due to a local prediction order of 255.

More specifically, the opt_order may be determined based on thefollowing equation:opt_order=min (global prediction order, local prediction order);And, global and local prediction orders may be determined by:global prediction order=ceil(log2(maximum prediction order+1))local prediction order=max(ceil(log2((Nb>>3)−1)), 1)

In the embodiments, data samples of the subdivided block from a channelare predicted. A first sample of a current block is predicted using thelast K samples of a previous block. The K value is determined from theopt_order which is derived from the above-described equation.

If the current block is a first block of the channel, no samples fromthe previous block are used. In this case, prediction with progressiveorder is employed. For example, assuming that the opt_order value is K=5for a corresponding block, the first sample in the block does notperform prediction. The second sample of the block uses the first sampleof the block to perform the prediction (as like K=1), the third sampleof the block uses the first and second samples of the block to performthe prediction (as like K=2), etc. Therefore, starting from the sixthsample and for samples thereafter, prediction is performed according tothe opt_order of K=5. As described above, the prediction order increasesprogressively from K=1 to K=5.

The above-described progressive order type of prediction is veryadvantageous when used in the random access frame. Since the randomaccess frame corresponds to a reference frame of the random access unit,the random access frame does not perform prediction by using theprevious frame sample. Namely, this progressive prediction technique maybe applied at the beginning of the random access frame.

Quantization of Predictor Coefficients

The above-described predictor coefficients are quantized in thequantizing part 130 of FIG. 1. Direct quantization of the predictorcoefficients h_(k) is not very efficient for transmission, since evensmall quantization errors may result in large deviations from thedesired spectral characteristics of the optimum prediction filter. Forthis reason, the quantization of predictor coefficients is based on theparcor (reflection) coefficients r_(k), which can be calculated by thecoefficient estimating part 120. As described above, for example, thecoefficient estimating part 120 is processed using the conventionalLevinson-Durbin algorithm.

The first two parcor coefficients (γ₁ and γ₂ correspondingly) arequantized by using the following functions:α₁=└65(−1+√{square root over (2)}√ γ ₁+1)┘;α₂=└65(−1+√{square root over (2)}√ γ ₂+1)┘;while the remaining coefficients are quantized using simple 7-bituniform quantizers:α_(k)=└64γ_(k)┘; (k>2).

In all cases the resulting quantized values α_(k) are restricted to therange [−64,63].

Entropy Coding

As shown in FIG. 1, two types of entropy coding are applied in thepresent invention. More specifically, the first entropy coding part 140is used for coding the above-described predictor coefficients. And, thesecond entropy coding part 180 is used for coding the above-describedaudio original samples and audio residual samples. Hereinafter, the twotypes of entropy coding will now be described in detail.

First Entropy Coding of the Predictor Coefficient

The related art Rice code is used as the first entropy coding methodaccording to the present invention. For example, transmission of thequantized coefficients α_(k) is performed by producing residual values:δ_(k)=α_(k)−offset_(k)which, in turn, are encoded by using the first entropy coding part 140,e.g., the Rice code method. The corresponding offsets and parameters ofRice code used in this process can be globally chosen from one of thesets shown in Table 3, 4 and 5 below. A table index (i.e., a 2-bit“coef_table”) is indicated in the configuration syntax (Table 6). If“coef_table=11”, this indicates that no entropy coding is applied, andthe quantized coefficients are transmitted with 7 bits each. In thiscase, the offset is always −64 in order to obtain unsigned valuesδ_(k)=α_(k)+64 that are restricted to [0,127]. Conversely, if“coeff_table=00”, Table 3 below is selected, and if “coeff_table=01”,Table 4 below is selected. Finally, if “coeff_table=11”, Table 5 isselected.

When receiving the quantized coefficients in the decoder of FIG. 2, thefirst entropy decoding part 220 reconstructs the predictor coefficientsby using the process that the residual values δ_(k) are combined withoffsets to produce quantized indices of parcor coefficients α_(k):α_(k)=δ_(k)+offset_(k)

Thereafter, the reconstruction of the first two coefficients (γ₁ and γ₂)is performed by using:par₁=└{circumflex over (γ)}₁2^(Q)┘=Γ(α₁);par₂=└{circumflex over (γ)}₂2^(Q)┘=−Γ(α₂);wherein 2^(Q) represents a constant (Q=20) scale factor required forinteger representation of the reconstructed coefficients, and Γ(.) is anempirically determined mapping table (not shown as the mapping table mayvary with implementation).

Accordingly, the three types of coefficient tables used for the firstentropy coding are provided according to the sampling frequency. Forexample, the sampling frequency may be divided to 48 kHz, 96 kHz, and192 kHz. Herein, each of the three Tables 3, 4, and 5 is respectivelyprovided for each sampling frequency.

Instead of using a single table, one of three different tables can bechosen for the entire file. The table should typically be chosendepending on the sampling rate. For material with 44.1 kHz, theapplicant of the present invention recommends to use the 48 kHz table.However, in general, the table can also be chosen by other criteria.TABLE 3 Rice code parameters used for encoding of quantized coefficients(48 kHz). Coefficient # Offset Rice parameter  1 −52 4  2 −29 5  3 −31 4 4 19 4  5 −16 4  6 12 3  7 −7 3  8 9 3  9 −5 3 10 6 3 11 −4 3 12 3 3 13−3 2 14 3 2 15 −2 2 16 3 2 17 −1 2 18 2 2 19 −1 2 20 2 2 2k − 1, k > 100 2 2k, k > 10 1 2

TABLE 4 Rice code parameters used for encoding of quantized coefficients(96 kHz). Coefficient # Offset Rice parameter  1 −58 3  2 −42 4  3 −46 4 4 37 5  5 −36 4  6 29 4  7 −29 4  8 25 4  9 −23 4 10 20 4 11 −17 4 1216 4 13 −12 4 14 12 3 15 −10 4 16 7 3 17 −4 4 18 3 3 19 −1 3 20 1 3 2k −1, k > 10 0 2 2k, k > 10 1 2

TABLE 5 Rice code parameters used for encoding of quantized coefficients(192 kHz). Coefficient # Offset Rice parameter  1 −59 3  2 −45 5  3 −504  4 38 4  5 −39 4  6 32 4  7 −30 4  8 25 3  9 −23 3 10 20 3 11 −20 3 1216 3 13 −13 3 14 10 3 15 −7 3 16 3 3 17 0 3 18 −1 3 19 2 3 20 −1 2 2k −1, k > 10 0 2 2k, k > 10 1 2

Second Entropy Coding of the Residual

The present invention contains two different modes of the coding methodapplied to the second entropy coding part 180 of FIG. 1, which will nowbe described in detail.

In the simple mode, the residual values e(n) are entropy coded usingRice code. For each block, either all values can be encoded using thesame Rice code, or the block can be further divided into four parts,each encoded with a different Rice code. The indices of the appliedcodes are transmitted, as shown in FIG. 1. Since there are differentways to determine the optimal Rice code for a given set of data, it isup to the encoder to select suitable codes depending upon the statisticsof the residual.

Alternatively, the encoder can use a more complex and efficient codingscheme using BGMC mode. In the BGMC mode, the encoding of residuals isaccomplished by splitting the distribution in two categories. The twotypes include residuals that belong to a central region of thedistribution, |e(n)|<e_(max), and residuals that belong to its tails.The residuals in tails are simply re-centered (i.e., for e(n)>e_(max),e_(r)(n)=e(n)−e_(max) is provided) and encoded using Rice code asdescribed above. However, in order to encode residuals in the center ofthe distribution, the BGMC first splits the residuals into LSB and MSBcomponents, then the BGMC encodes MSBs using block Gilbert-Moore(arithmetic) codes. And finally, the BGMC transmits LSBs using directfixed-lengths codes. Both parameters e_(max) and the number of directlytransmitted LSBs may be selected such that they only slightly affect thecoding efficiency of this scheme, while allowing the coding to besignificantly less complex.

The configuration syntax (Table 6) and the block_data syntax (Table 8)according to the present invention include information related to codingof the Rice code and BGMC code. The information will now be described indetail

The configuration syntax (Table 6) first includes a 1-bit “bgmc_mode”field. For example, “bgmc_mode=0” signifies the Rice code, and“bgmc_mode=1” signifies the BGMC code. The configuration syntax (Table6) also includes a 1-bit “sb_part” field. The “sb_part” fieldcorresponds to information related to a method of partitioning a blockto a sub-block and coding the partitioned sub-block. Herein, the meaningof the “sb_part” field varies in accordance with the value of the“bgmc_mode” field.

For example, when “bgmc_mode=0”, in other words when the Rice code isapplied, “sb_part=0” signifies that the block is not partitioned intosub-blocks. Alternatively, “sb_part=1” signifies that the block ispartitioned at a 1:4 sub-block partition ratio. Additionally, when“bgmc_mode=1”, in other words when the BGMC code is applied, “sb_part=0”signifies that the block is partitioned at a 1:4 sub-block partitionratio. Alternatively, “sb_part=1” signifies that the block ispartitioned at a 1:2:4:8 sub-block partition ratio.

The block_data syntax (Table 8) for each block corresponding to theinformation included in the configuration syntax (Table 6) includes0-bit to 2-bit variable “ec_sub” fields. More specifically, the “ec_sub”field indicates the number of sub-blocks existing in the actualcorresponding block. Herein, the meaning of the “ec_sub” field varies inaccordance with the value of the “bgmc_mode”+“sb_part” fields within theconfiguration syntax (Table 6).

For example, “bgmc_mode+sb_part=0” signifies that the Rice code does notconfigure the sub-block. Herein, the “ec_sub” field is a 0-bit field,which signifies that no information is included.

In addition, “bgmc_mode+sb_part=1” signifies that the Rice code or theBGMC code is used to partition the block to sub-blocks at a 1:4 rate.Herein, only 1 bit is assigned to the “ec_sub” field. For example,“ec_sub=0” indicates one sub-block (i.e., the block is not partitionedto sub-blocks), and “ec_sub=1” indicates that 4 sub-blocks areconfigured.

Furthermore, “bgmc_mode+sb_part=2” signifies that the BGMC code is usedto partition the block to sub-blocks at a 1:2:4:8 rate. Herein, 2 bitsare assigned to the “ec_sub” field. For example, “ec_sub=00” indicatesone sub-block (i.e., the block is not partitioned to sub-blocks), and,“ec_sub=01” indicates 2 sub-blocks. Also, “ec_sub=10” indicates 4sub-blocks, and “ec_sub=11” indicates 8 sub-blocks.

The sub-blocks defined within each block as described above are coded bysecond entropy coding part 180 using a difference coding method. Anexample of using the Rice code will now be described. For each block ofresidual values, either all values can be encoded using the same Ricecode, or, if the “sb_part” field in the configuration syntax is set, theblock can be partitioned into 4 sub-blocks, each encoded sub-blockhaving a different Rice code. In the latter case, the “ec_sub” field inthe block-data syntax (Table 8) indicates whether one or four blocks areused.

While the parameter s[i=0] of the first sub-block is directlytransmitted with either 4 bits (resolution≦16 bits) or 5 bits(resolution>16 bits), only the differences (s[i]−s[i−1]) of followingparameters s[i>0] are transmitted. These differences are additionallyencoded using appropriately chosen Rice codes again. In this case, theRice code parameter used for differences has the value of “0”.

Syntax

According to the embodiment of the present invention, the syntax of thevarious information included in the audio bitstream are shown in thetables below. Table 6 shows a configuration syntax for audio losslesscoding. The configuration syntax may form a header periodically placedin the bitstream, may form a header of each frame; etc. Table 7 shows aframe-data syntax, and Table 8 shows a block-data syntax. TABLE 6Configuration syntax. Syntax Bits ALSSpecificConfig( ) { samp_freq; 32samples; 32 channels; 16 file_type; 3 resolution; 3 floating; 1msb_first; 1 frame_length; 16 random_access; 8 ra_flag; 2 adapt_order; 1coef_table; 2 long_term_prediction; 1 max_order; 10 block_switching; 2bgmc_mode; 1 sb_part; 1 joint_stereo; 1 mc_coding; 1 chan_config; 1chan_sort; 1 crc_enabled; 1 RLSLMS 1 (reserved) 6 if (chan_config) {chan_config_info; 16 } if (chan_sort) { for (c = 0; c < channels; c++)chan_pos[c]; 8 } header_size; 16 trailer_size; 16 orig_header[ ];header_size * 8 orig_trailer[ ]; trailer_size * 8 if (crc_enabled) {crc; 32 } if ((ra_flag == 2) && (random_access > 0)) { for (f = 0; f <(samples − 1 / frame_length) + 1; f++) { ra_unit_size 32 } } }

TABLE 7 Frame_data syntax. Syntax Bits frame_data( ) { if ((ra_flag== 1) && (frame_id % random_access == 0)) { ra_unit_size 32 } if(mc_coding && joint_stereo) { js_switch; 1 byte_align; } if (!mc_coding|| js_switch) { for (c = 0; c < channels; c++) { if (block_switching) {bs_info; 8, 16, 32 } if (independent_bs) { for (b = 0; b < blocks; b++){ block_data(c); } } else{ for (b = 0; b < blocks; b++) { block_data(c);block_data(c+1); } c++; } } else{ if (block_switching) { bs_info; 8, 16,32 } for (b = 0; b < blocks; b++) { for (c = 0; c < channels; c++) {block_data(c); channel_data(c); } } } if (floating) {num_bytes_diff_float; 32 diff_float_data( ); } }

TABLE 8 Block_data syntax. Syntax Bits block_data( ) { block_type; 1 if(block_type == 0) { const_block; 1 js_block; 1 (reserved) 5 if(const_block == 1) { { if (resolution == 8) { const_val; 8 } else if(resolution == 16) { const_val; 16 } else if (resolution == 24) {const_val; 24 } else { const_val; 32 } } } else { js_block; 1 if((bgmc_mode == 0) && (sb_part == 0) { sub_blocks = 1; } else if((bgmc_mode == 1) && (sb_part ==1) { ec_sub; 2 sub_blocks = 1 << ec_sub;} else { ec_sub; sub_blocks = (ec_sub == 1) ? 4 : 1; } if (bgmc_mode ==0) { for (k = 0; k < sub_blocks; k++) { s[k]; varies } } else { for (k =0; k < sub_blocks; k++) { s[k],sx[k]; varies } } sb_length =block_length / sub_blocks; shift_lsbs; 1 if (shift_lsbs == 1) {shift_pos; 4 } if (!RLSLMS) { if (adapt_order == 1) { opt_order; 1...10} for (p = 0; p < opt_order; p++) { quant_cof[p]; varies } }

Compression Results

In the following, the lossless audio codec is compared with two of themost popular programs for lossless audio compression: the open-sourcecodec FLAC and the Monkey's Audio (MAC 3.97). Herein, the open-sourcecodec FLAC uses forward-adaptive prediction, and the Monkey's Audio (MAC3.97) is a backward-adaptive codec used as the current state-of-the-artalgorithm in terms of compression. Both codecs were run with optionsproviding maximum compression (i.e., flac −8 and mac-c4000). The resultsfor the encoder are determined for a medium compression level (with theprediction order restricted to K_(—)60) and a maximum compression level(K_(—)1023), both with random access of 500 ms. The tests were conductedon a 1.7 GHz Pentium-M system, with 1024 MB of memory. The testcomprises nearly 1 GB of stereo waveform data with sampling rates of 48,96, and 192 kHz, and resolutions of 16 and 24 bits.

Compression Ratio

In the following, the compression ratio is defined as:${C = {\frac{CompressedFileSize}{OriginalFileSize}*100\%}},$

wherein smaller values indicate better compression. The results for theexamined audio formats are shown in Table 9 (192 kHz material is notsupported by the FLAC codec). TABLE 9 Comparison of average compressionratios for different audio formats (kHz/bits). ALS ALS Format FLAC MACmedium maximum 48/16 48.6 45.3 45.5 44.7 48/24 68.4 63.2 63.3 62.7 96/2456.7 48.1 46.5 46.2 192/24  — 39.1 37.7 37.6 Total — 48.9 48.3 47.8

The results show that ALS at maximum level outperforms both FLAC andMonkey's Audio for all formats, but particularly for high-definitionmaterial (i.e., 96 kHz/24-bit and above). Even at medium level, ALSdelivers the best overall compression.

Complexity

The complexity of different codecs strongly depends on the actualimplementation, particularly that of the encoder. As mentioned above,the audio signal encoder of the present invention is an ongoingdevelopment. Thus, we restrict our analysis to the decoder, a simple Ccode implementation with no further optimizations. The compressed datawere generated by the currently best encoder implementation. The averageCPU load for real-time decoding of various audio formats, encoded atdifferent complexity levels, is shown in Table 10. Even for maximumcomplexity, the CPU load of the decoder is only around 20-25%, which inreturn means that file based decoding is at least 4 to 5 times fasterthan real-time. TABLE 10 Average CPU load (percentage on a 1.7 GHzPentium-M), depending on audio format (kHz/bits) and ALS encodercomplexity. ALS Format ALS low ALS medium maximum 48/16 1.6 4.9 18.748/24 1.8 5.8 19.6 96/24 3.6 12.0 23.8 192/24  6.7 22.8 26.7

The codec is designed to offer a large range of complexity levels. Whilethe maximum level achieves the highest compression at the expense ofslowest encoding and decoding speed, the faster medium level onlyslightly degrades compression, but decoding is significantly lesscomplex than for the maximum level (i.e., approximately 5% CPU load for48 kHz material). Using a low-complexity level (i.e., K_(—)15, Ricecoding) degrades compression by only 1 to 1.5% compared to the mediumlevel, but the decoder complexity is further reduced by a factor ofthree (i.e., less than 2% CPU load for 48 kHz material). Thus, audiodata can be decoded even on hardware with very low computing power.

While the encoder complexity may be increased by both higher maximumorders and a more elaborate block switching algorithm (in accordancewith the embodiments), the decoder may be affected by a higher averageprediction order.

The foregoing embodiments (e.g., hierarchical block switching) andadvantages are merely examples and are not to be construed as limitingthe appended claims. The above teachings can be applied to otherapparatuses and methods, as would be appreciated by one of ordinaryskill in the art. Many alternatives, modifications, and variations willbe apparent to those skilled in the art.

INDUSTRIAL APPLICABILITY

It will be apparent to those skilled in the art that variousmodifications and variations can be made in the present inventionwithout departing from the spirit or scope of the inventions. Forexample, aspects and embodiments of the present invention can be readilyadopted in another audio signal codec like the lossy audio signal codec.Thus, it is intended that the present invention covers the modificationsand variations of this invention.

1. A method of processing an audio signal, the method comprising:independently subdividing at least first and second channels in a frameof the audio signal into blocks if the first and second channels are notcorrelated with each other; correspondingly subdividing the first andsecond channels into blocks such that the lengths of the blocks intowhich the second channel is subdivided correspond to the lengths of theblocks into which the first channel is subdivided if the first andsecond channels are correlated with each other; and generating firstinformation indicating whether the first and second channels areindependently subdivided or correspondingly subdivided.
 2. The method ofclaim 1, wherein the generating first information step generates thefirst information to include a number of information bits, and a firstof the information bits indicates whether the first and second channelsare independently subdivided or correspondingly subdivided.
 3. Themethod of claim 2, wherein if the first information bit is 0, the firstinformation indicates the first and second channels are correspondinglysubdivided.
 4. The method of claim 3, wherein if the first informationbit is 1, the first information indicates that the first and secondchannels are independently subdivided.
 5. The method of claim 2, whereinif the first information bit is 1, the first information indicates thefirst and second channels are independently subdivided.
 6. The method ofclaim 1, wherein the independently subdividing step and thecorrespondingly subdividing step both subdivide the first and secondchannels according to a subdivision hierarchy, the subdivision hierarchyhas more than one level, and each level is associated with a differentblock length.
 7. The method of claim 6, wherein the first informationfurther indicates how the channel is subdivided.
 8. The method of claim6, wherein the generating first information step generates the firstinformation such that the first information includes a number ofinformation bits X, and the information bits indicate (i) whether thefirst and second channels are independently subdivided orcorrespondingly subdivided and (ii) the subdivision of the channel intothe blocks.
 9. The method of claim 8, wherein a first of the informationbits indicates whether the first and second channels are independentlysubdivided or correspondingly subdivided; and each of a second to an Xthof the information bits is associated with a level in the subdivisionhierarchy and is associated with a block at the associated level, andeach of the second to the Xth information bits indicates whether theassociated block was subdivided.
 10. The method of claim 9, wherein ifone of the second to the Xth information bit has a value of 1, then theassociated block is subdivided, and if one of the second to the Xthinformation bit has a value of 0, then the associated block is notsubdivided.
 11. The method of claim 10, wherein if the first informationbit is 0, the first information indicates the first and second channelsare correspondingly subdivided; and if the first information bit is 1,the first information indicates that the first and second channels areindependently subdivided.
 12. The method of claim 9, wherein if thefirst information bit is 0, the first information indicates the firstand second channels are correspondingly subdivided; and if the firstinformation bit is 1, the first information indicates that the first andsecond channels are independently subdivided.
 13. The method of claim 6,further comprising: generating second information indicating a number oflevels in the subdivision hierarchy.
 14. The method of claim 13, whereinthe second information includes 2 bits.
 15. The method of claim 13,wherein the second information indicates whether the subdivisionhierarchy includes one of up to three levels, four levels, and fivelevels.
 16. The method of claim 15, wherein if the second information is01, the second information indicates the subdivision hierarchy includesup to three levels; if the second information is 10, the secondinformation indicates the subdivision hierarchy includes four levels; ifthe second information is 11, the second information indicates thesubdivision hierarchy includes five levels.
 17. The method of claim 13,wherein a length of the first information is one of 8 bits, 16 bits and32 bits.
 18. The method of claim 13, wherein a length of the firstinformation is 8 bits if the second information indicates thesubdivision hierarchy includes up to three levels.
 19. The method ofclaim 13, wherein a length of the first information is 16 bits if thesecond information indicates the subdivision hierarchy includes fourlevels.
 20. The method of claim 13, wherein a length of the firstinformation is 32 bits if the second information indicates thesubdivision hierarchy includes five levels.
 21. The method of claim 6,wherein a length of the first information is 8 bits if the subdivisionhierarchy includes up to three levels.
 22. The method of claim 6,wherein a length of the first information is 16 bits if the subdivisionhierarchy includes four levels.
 23. The method of claim 6, wherein alength of the first information is 32 bits if the subdivision hierarchyincludes five levels.
 24. The method of claim 6, further comprising:predicting current data samples in the channel based on previous datasamples, a number of the previous data samples used in the predictingstep being the prediction order; and obtaining a residual of the currentdata samples based on the predicted data samples.
 25. The method ofclaim 24, wherein the predicting step progressively increases theprediction order to a desired prediction order as previous data samplesbecome available.
 26. The method of claim 25, wherein the predictionorder for an initial data sample having no previous data samples iszero, and the predicting step generates zero as the predicted initialdata sample; and the obtaining step effectively does not changes theinitial data sample as a result of the predicted initial data samplebeing zero.
 27. The method of claim 25, further comprising: determiningthe desired prediction order for each block based on a maximum permittedprediction order and a length of the block.
 28. The method of claim 24,further comprising: determining an optimum prediction order for eachblock based on a maximum permitted prediction order and a length of theblock.
 29. The method of claim 28, wherein the determining stepcomprises: determining a global prediction order based on the maximumpermitted prediction order; determining a local prediction order basedon the length of the block; and selecting a minimum one of the globalprediction order and the local prediction order as the optimumprediction order.
 30. The method of claim 24, wherein if the frame is arandom access frame, which is a frame to be encoded such that previousframes are not necessary to decode the frame, the predicting stepprogressively increases the prediction order to a desired predictionorder as previous data samples from only the random access frame becomeavailable.
 31. The method of claim 6, wherein a superordinate level ofthe subdivision hierarchy is associated with a block length double ablock length associated with a subordinate level.
 32. The method ofclaim 6, wherein the subdividing step selectively subdivides a block ofthe superordinate level to obtain two blocks at the subordinate level.33. The method of claim 6, wherein if a channel has a length of N, thenthe subdividing step subdivides the channel into the plurality of blockssuch that each block has a length of one of N/2, N/4, N/8, N/16 andN/32.
 34. The method of claim 6, wherein the subdividing step subdividesthe channel into the plurality of blocks such that each block has alength equal to one of,N/(m^(i)) for I=1, 2, . . . p, where N is the length of the channel, mis an integer greater than or equal to 2, and p represents a number ofthe levels in the subdivision hierarchy.
 35. The method of claim 34,wherein m=2 and p=5.
 36. A method of processing an audio signal, themethod comprising: independently switching lengths of blocks into whichat least first and second channels in a frame of the audio signal aredivided if the first and second channels are not correlated with eachother; synchronously switching lengths of blocks into which the firstand second channels are divided such that the block lengths of each ofthe first and second channels are switched to a same length at a sametime if the first and second channels are correlated with each other;and generating first information indicating whether the independentswitching or the synchronous switching was performed.
 37. A method ofencoding an audio signal, comprising: independently subdividing at leastfirst and second channels in a frame of the audio signal into blocks ifthe first and second channels are not correlated with each other;correspondingly subdividing the first and second channels into blockssuch that the lengths of the blocks into which the second channel issubdivided correspond to the lengths of the blocks into which the firstchannel is subdivided if the first and second channels are correlatedwith each other; generating first information indicating whether thefirst and second channels are independently subdivided orcorrespondingly subdivided; and encoding the plurality of blocks toproduce a compressed bitstream that includes the first information. 38.A method of decoding an audio signal, comprising: receiving an audiodata frame having at least first and second channels, the first andsecond channels having been independently subdivided into blocks if thefirst and second channels are not correlated with each other, and thefirst and second channels having been correspondingly subdivided intoblocks such that the lengths of the blocks into which the second channelis subdivided correspond to the lengths of the blocks into which thefirst channel is subdivided if the first and second channels arecorrelated with each other; and obtaining first information indicatingwhether the first and second channels are independently subdivided orcorrespondingly subdivided; and decoding the first and second channelsbased on the obtained first information.
 39. An apparatus for encodingan audio signal, comprising: an encoder configured to independentlysubdivide at least first and second channels in a frame of the audiosignal into blocks if the first and second channels are not correlatedwith each other; the encoder configured to correspondingly subdivide thefirst and second channels into blocks such that the lengths of theblocks into which the second channel is subdivided correspond to thelengths of the blocks into which the first channel is subdivided if thefirst and second channels are correlated with each other; the encoderconfigured to generate first information indicating whether the firstand second channels are independently subdivided or correspondinglysubdivided; and the encoder configured to encode the plurality of blocksto produce a compressed bitstream that include the first information.40. An apparatus for decoding an audio signal, comprising: a decoderconfigured to receive an audio data frame having at least first andsecond channels, the first and second channels having been independentlysubdivided into blocks if the first and second channels are notcorrelated with each other, and the first and second channels havingbeen correspondingly subdivided into blocks such that the lengths of theblocks into which the second channel is subdivided correspond to thelengths of the blocks into which the first channel is subdivided if thefirst and second channels are correlated with each other; and thedecoder configured to obtain first information indicating whether thefirst and second channels are independently subdivided orcorrespondingly subdivided; and the decoder configured to decode thefirst and second channels based on the obtained first information.